#include <iostream>
#include "yaml-cpp/yaml.h"
#include "mint/strategy/du_strategy.h"


using namespace std;
using namespace junyi::mint::wrapper;

int main(int argc, char* argv[])
{
	std::cout << "call du_thrust strategy" << endl;

	YAML::Node node = YAML::LoadFile("./config.yml");

	double cash_limit = node["cash_limit"].as<double>();
	std::string account = node["account"].as<string>();
	std::vector<string> instruments = node["instruments"].as<std::vector<string>>();

	std::cout << fixed;
	std::cout << setprecision(4);
	std::cout << "Prepere to start strategy for account:" << account << " cash limit:" << cash_limit << " instruments:";
	for (auto instrument : instruments) {
		std::cout << instrument << " ";
	}
	std::cout << std::endl;

	Du_TH_Strategy du_th_strategy = Du_TH_Strategy("E:\\mint\\kungfu\\app", account, instruments, cash_limit);

	du_th_strategy.load_strategy();

	return 0;
}